package com.example.demo.design.GoF.command.example;

/**
 * //调用者
 *
 * @author luowj12
 * @since 2021/5/8 16:15
 */
public class Invoker {

    private Command command;
    public Invoker(Command command) {
        this.command = command;
    }
    public void setCommand(Command command) {
        this.command = command;
    }
    public void call() {
        System.out.println("调用者执行命令command...");
        command.execute();
    }

}
